package cn.iocoder.yudao.module.xkfz.service.basic.impl;

import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.xkfz.domain.entity.clinicalHealthCare.ElementData;
import cn.iocoder.yudao.module.xkfz.domain.po.clinicalHealthCare.ElementDataPo;
import cn.iocoder.yudao.module.xkfz.mapper.clinicalHealthCare.ElementDataMapper;
import cn.iocoder.yudao.module.xkfz.service.basic.IndicatorClassCalculationService;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 指标类原始数据处理
 */
@Service
public class IndicatorClassCalculationServiceImpl implements IndicatorClassCalculationService {
    @Autowired
    private ElementDataMapper elementDataMapper;
    @Override
    public List<ElementData> queryElements(ElementDataPo elementData) {
        Wrapper<ElementData> wrapper = new LambdaQueryWrapperX<ElementData>()
                .eqIfPresent(ElementData::getId, elementData.getId())
                .eqIfPresent(ElementData::getPeriodTime, elementData.getPeriodTime());
        return elementDataMapper.selectList(wrapper);
    }
}
